<template>
  <div class="comment-page2">
    <div class="comment-page-header">
      <svg class="back-arrow" viewBox="0 0 24 43" @click="goBack">
        <path d="M20 2 L4 21.5 L20 41" stroke="#222" stroke-width="4" fill="none" stroke-linecap="round"/>
      </svg>
      <span class="comment-page-title">商品评价 · {{ comments.length }}</span>
    </div>
    <div class="comment-tabs">
      <span class="tab active">推荐</span>
      <span class="tab">最新</span>
      <span class="tab">带图</span>
      <span class="tab">选商品规格 <svg width="16" height="16"><circle cx="8" cy="8" r="7" stroke="#bbb" fill="none"/></svg></span>
    </div>
    <div class="comment-page-list">
      <div class="comment-item2" v-for="c in comments" :key="c.id">
        <img class="comment-avatar2" :src="c.avatar" />
        <div class="comment-main2">
          <div class="comment-user-row2">
            <span class="comment-nick2">{{ c.user }}</span>
            <span class="comment-tag2">超赞</span>
            <span class="comment-stars2">★★★★★</span>
            <span class="comment-date2">{{ c.date }}</span>
            <span class="comment-place2">{{ c.place }}</span>
            <span class="comment-reply">回复</span>
          </div>
          <div class="comment-content2">{{ c.content }}</div>
        </div>
      </div>
    </div>
    <div class="comment-tip">
      <div class="tip-title">小红书主张真实有帮助的评价内容</div>
      <div class="tip-desc">平台鼓励用户发表基于商品使用的真实体验感受。对消费者挑选商品帮助意义不大的评价内容做折叠。</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MarketComment',
  data() {
    return {
      comments: [
        { id: 1, user: '月凝寒', avatar:  require('/public/img/shop/detail/2/shoptitle1.png'), content: '尺码合适，价格便宜值得购买，喜欢的抓紧咯', date: '02-06', place: '辽宁' },
        { id: 2, user: '黑裙', avatar:  require('/public/img/shop/detail/2/shoptitle2.png'), content: '质量很好，穿着舒服，推荐！', date: '01-12', place: '广东' },
        { id: 3, user: '上善若水', avatar:  require('/public/img/shop/detail/2/shoptitle3.png'), content: '发货快，服务好，满意的一次购物体验', date: '2024-12-14', place: '福建' },
        { id: 4, user: '慢***', avatar:  require('/public/img/shop/detail/2/shoptitle4.png'), content: '檀香木', date: '2024-11-10', place: '广东' },
        { id: 5, user: 'm***版', avatar:  require('/public/img/shop/detail/2/shoptitle5.png'), content: '确认收货啦~暂未填写评价内容', date: '05-07', place: '' }
      ]
    }
  },
  methods: {
    goBack() {
      this.$router.back();
    }
  }
}
</script>

<style scoped>
.comment-page2 {
  background: #fff;
  border-radius: 0;
  width: 750px;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.comment-page-header {
  display: flex;
  align-items: center;
  height: 70px;
  border-bottom: 1px solid #f0f0f0;
  padding: 0 24px;
}
.comment-page-header .back-arrow {
  position: static;
  width: 32px;
  height: 32px;
  margin-left: 0;
  margin-right: 18px;
  background: none;
  box-shadow: none;
}
.comment-page-title {
  font-size: 32px;
  font-weight: bold;
  color: #222;
}
.comment-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  margin: 18px 0 12px 0;
}
.tab {
  font-size: 24px;
  color: #bbb;
  cursor: pointer;
}
.tab.active {
  color: #fe2c55;
  font-weight: bold;
  border-bottom: 3px solid #fe2c55;
  padding-bottom: 4px;
}
.comment-page-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}
.comment-item2 {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 18px;
}
.comment-avatar2 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}
.comment-main2 {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.comment-user-row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-nick2 {
  font-size: 22px;
  color: #222;
  font-weight: bold;
}
.comment-tag2 {
  font-size: 18px;
  color: #fe2c55;
  background: #fff0f0;
  border-radius: 6px;
  padding: 2px 8px;
}
.comment-stars2 {
  font-size: 18px;
  color: #fe2c55;
}
.comment-date2, .comment-place2 {
  font-size: 18px;
  color: #bbb;
}
.comment-reply {
  font-size: 18px;
  color: #bbb;
  margin-left: 8px;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 2px 8px;
}
.comment-content2 {
  font-size: 24px;
  color: #222;
  margin-bottom: 4px;
}
.comment-like2 {
  width: 28px;
  height: 28px;
  margin-left: 8px;
}
.comment-tip {
  background: #fafafa;
  border-radius: 12px;
  margin: 24px 24px 0 24px;
  padding: 18px 18px 12px 18px;
}
.tip-title {
  font-size: 22px;
  color: #222;
  font-weight: bold;
  margin-bottom: 6px;
}
.tip-desc {
  font-size: 20px;
  color: #888;
}
</style> 